package com.scau.XFourPOS.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**     
 * 类名称：ProductStock
 * 类描述：产品存货的model表
 * 创建人：庄祥鹏
 * */
@Entity
@Table(name = "product_stock")
public class ProductStock {
	/**
	 * 产品存货id,联合主键，使用ProductStockPK类
	 */
	@EmbeddedId
	private ProductStockPK productStockPK;
	/**
	 * 存货数量
	 */
	@Column(name="num")
	private int num;

	/**
	 * 衣服价格
	 */
	@Column(name="price")
	private double price;
	
	/**
	 * getter and setter
	 */
	public ProductStockPK getProductStockPK() {
		return productStockPK;
	}

	public void setProductStockPK(ProductStockPK productStockPK) {
		this.productStockPK = productStockPK;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

}
